package Java语言.数据结构.数组.二维和多维数组;

import java.util.Arrays;
import java.util.Scanner;

public class ArrayDes {
    public static void main(String[] args) {

        Scanner s = new Scanner("2");
        int i = s.nextInt();
        int[][] t = {new int[3], {}, {1, 2, 3, 5, 2, 1, 2}};
//        Arrays.setAll(t, operand -> operand+2);
        System.out.println(Arrays.deepToString(t));
        System.out.println(Arrays.toString(t[2]));
        int[][] t2 = new int[2][];

        t2[0] = new int[2];
        System.arraycopy(t[2], 0, t[0], 0, 3);
        System.out.println(Arrays.deepEquals(t2, t));
        System.out.println(Arrays.deepToString(t));
        System.out.println(Arrays.deepToString(t2));

        System.out.println(t[0].length);
//二维数组深拷贝，不能这么干
        //只有一维数组是深拷贝

//        System.arraycopy(t,0,t2,0,3);

    }
}
